package model;

import java.sql.Date;

/**
 * 
 * @author Nelly-Kim TRAN
 * 
 *This class contains all the information about a person in the address book
 *The parameters of the class are obvious.
 *	
 *
 */

public class Contact {
	
	private String firstname;
	private String lastname;
	private String homeaddress;
	private String companyaddress;
	private String personalmobile;
	private String personalhome;
	private String professionnalmobile;
	private String professionnaloffice;
	private String homepage;
	private String personalemail;
	private String professionalemail;
	private String photo;
	private String group;
	
	
	
	public Contact(String firstname, String lastname, String homeaddress,
			String companyaddress, String personalmobile, String personalhome,
			String professionnalmobile, String professionnaloffice, String homepage,
			String personalemail, String professionalemail, String photo, String group) {
		this.firstname = firstname;
		this.lastname = lastname;
		this.homeaddress = homeaddress;
		this.companyaddress = companyaddress;
		this.personalmobile = personalmobile;
		this.personalhome = personalhome;
		this.professionnalmobile = professionnalmobile;
		this.professionnaloffice = professionnaloffice;
		this.homepage = homepage;
		this.personalemail = personalemail;
		this.professionalemail = professionalemail;
		this.photo = photo;
		this.group = group;
	}
	
	
	public String getFirstname() {
		return firstname;
	}
	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}
	public String getLastname() {
		return lastname;
	}
	public void setLastname(String lastname) {
		this.lastname = lastname;
	}
	public String getHomeaddress() {
		return homeaddress;
	}
	public void setHomeaddress(String homeaddress) {
		this.homeaddress = homeaddress;
	}
	public String getCompanyaddress() {
		return companyaddress;
	}
	public void setCompanyaddress(String companyaddress) {
		this.companyaddress = companyaddress;
	}
	public String getPersonalmobile() {
		return personalmobile;
	}
	public void setPersonalmobile(String personalmobile) {
		this.personalmobile = personalmobile;
	}
	public String getPersonalhome() {
		return personalhome;
	}
	public void setPersonalhome(String personalhome) {
		this.personalhome = personalhome;
	}
	public String getProfessionnalmobile() {
		return professionnalmobile;
	}
	public void setProfessionnalmobile(String professionnalmobile) {
		this.professionnalmobile = professionnalmobile;
	}
	public String getProfessionnaloffice() {
		return professionnaloffice;
	}
	public void setProfessionnaloffice(String professionnaloffice) {
		this.professionnaloffice = professionnaloffice;
	}
	public String getHomepage() {
		return homepage;
	}
	public void setHomepage(String homepage) {
		this.homepage = homepage;
	}
	public String getPersonalemail() {
		return personalemail;
	}
	public void setPersonalemail(String personalemail) {
		this.personalemail = personalemail;
	}
	public String getProfessionalemail() {
		return professionalemail;
	}
	public void setProfessionalemail(String professionalemail) {
		this.professionalemail = professionalemail;
	}
	public String getPhoto() {
		return photo;
	}
	public void setPhoto(String photo) {
		this.photo = photo;
	}
	public String getGroup() {
		return group;
	}
	public void setGroup(String group) {
		this.group = group;
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((firstname == null) ? 0 : firstname.hashCode());
		result = prime * result
				+ ((lastname == null) ? 0 : lastname.hashCode());
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Contact other = (Contact) obj;
		if (firstname == null) {
			if (other.firstname != null)
				return false;
		} else if (!firstname.equals(other.firstname))
			return false;
		if (lastname == null) {
			if (other.lastname != null)
				return false;
		} else if (!lastname.equals(other.lastname))
			return false;
		return true;
	}
	
	

	


}
